package com.haodai.vip.tomcat;

import com.haodai.vip.tomcat.server.HttpServer;
import com.haodai.vip.tomcat.server.controller.GetSessionController;
import com.haodai.vip.tomcat.server.controller.HeaderAndParamaController;
import com.haodai.vip.tomcat.server.controller.SetSessionController;

public class TomcatUtils {

    public static void main(String[] args) {
        HttpServer server = HttpServer.getInstance();
        server.addController("requestInfo.action", new HeaderAndParamaController());

        server.addController("login.action", new SetSessionController());
        server.addController("home.action", new GetSessionController());

        server.start();

//        byte[] bytes = checkLock("864287034717437");
//        StringBuilder sb = new StringBuilder();
//        for (int i = 0; i < bytes.length; i++) {
//            sb.append(bytes[i]+",");
//        }
//        sb.deleteCharAt(sb.length()-1);
//        LogUtils.info(sb.toString());
    }

}
